1. Technical Field
The present invention relates generally to execution of Web-based applications in a content delivery network.
2. Description of the Related Art
Enterprises can expand their business, increase efficiency, and enable new revenue streams by extending their business applications over the Internet to customers, partners, and suppliers. One way to enable enterprises to shift the operational burden of running a reliable and secure Web presence is to outsource that presence, in whole or in part, to a service provider, such as a content delivery network (CDN). A content delivery network is a collection of content servers and associated control mechanisms that offload work from Web site origin servers by delivering content (e.g., Web objects, streaming media, HTML and executable code) on their behalf to end users. Typically, the content servers are located at the “edge” of the Internet. A well-managed CDN achieves this goal by serving some or all of the contents of a site's Web pages, thereby reducing the customer's infrastructure costs while enhancing an end user's browsing experience from the site. In operation, the CDN uses a request routing mechanism to locate a CDN edge server electronically close to the client to serve a request directed to the CDN. Sites that use a CDN benefit from the scalability, superior performance, and availability of the CDN service provider's outsourced infrastructure.
Many enterprises, such as those that outsource their content delivery requirements, also implement their business services as multi-tier (n-tier) applications. In a representative n-tiered application, Web-based technologies are used as an outer (a first or “presentation”) tier to interface users to the application, and one or more other tiers comprise middleware that provides the core business logic and/or that integrates the application with existing enterprise information systems. The Java 2 Platform, Enterprise Edition (J2EE™) is a technology and an associated component-based model that reduces the cost and complexity of developing such multi-tier, enterprise services. The J2EE runtime environment defines several types of application components that can be used to build services. These include (a) Web tier components (e.g., servlets, JSP pages, Java beans, filters, and web event listeners), which are components that typically execute in a web server and respond to HTTP requests from web clients, and (b) Enterprise tier components (e.g., session beans, entity beans and message driven beans, which may be developed as Enterprise JavaBeans™ (EJB™)), that include the business logic and that execute in a managed environment to support transactions. Runtime support for J2EE application components are provided by so-called “containers,” with a Web container supporting the Web tier components, and an Enterprise container supporting the Enterprise tier components. Containers execute the application components and provide utility services. J2EE-compliant servers provide deployment, management and execution support for conforming application components.
Provisioning server-side Java applications or application components to run on CDN edge servers presents complex deployment and operational issues. A solution is described in commonly-owned, copending application Ser. No. 10/340,206, filed Jan. 11, 2003, titled “Java Application Framework For Use In A Content Delivery Network.” According to that document, given edge servers in the CDN are provisioned with application server code used to execute Web tier components of an application (an “edge-enabled application”). Business applications running on the CDN using this framework can create, access and modify state for each client. Over time, a single client may access a given application on different CDN edge servers within the same region and even across different regions. Each time, the application may need to access the latest “state” of the client even if the state was last modified by an application on a different server. The difficulty arises when a process or a machine that last modified the state dies or is temporarily or permanently unavailable. Thus, an important problem that needs to be solved in the context of a CDN in which an application framework is supported is the management of user session state.
As is well-known, components in the web-tier of an enterprise application, such as servlets, typically store user session state in objects. These objects are stored in the web-tier container. Throughout a user session, the state of the session is made available to all servlets within the web-tier container, e.g., through a mechanism such as a map (hash) lookup. While this scheme may work for single process web containers, it cannot be scaled to work within a CDN, where an end user may be mapped, within the same session, to a set of servers within the CDN region or across one or more regions.
The present invention provides several solutions to address this problem.